xlv.obj.img={
	extend:function(){
	},
	implement:function(){
		this.implement('xlv.imp.mvc');
	},
	create:function(tag){
		var div=document.createElement((tag||'div'));
		div.setAttribute('xlvobject','xlv.obj.img');
		return div;			
	},
	properties:{
		dmName:null,
		dmPath:null,
		width:null,
		height:null
	},
	method:{
		construct:function(){
			var v=this.$V;
			v.img=xlv.util.isTag(this,'img') ? this :xlv.util.findChild(this,{tag:'img'});
			if(!v.img){
				v.img=document.createElement('img');
				if(this.$P.width)v.img.setAttribute('width',this.$P.width);
				if(this.$P.height)v.img.setAttribute('height',this.$P.height);
				this.appendChild(v.img);
			}
			this.styleFor(v.img);
		},
		initial:function(){
		},
		styleFor:function(img){
		},
		/**mvc imp*/
		mvc_valueFromModel:function(dm){
			return this.mvc_isModel(dm) ? dm.getValue(this.$P.dmPath) : null;
		},
		mvc_valueToModel:function(value,dm){
			if(this.mvc_isModel(dm)) dm.setValue(value,this.$P.dmPath);
		},
		mvc_beforeModelChanged:function(model,notify,memo){
		},
		mvc_modelChanged:function(dm,notify,memo){
			if(this.mvc_isModel(dm))this.mvc_valueToView(this.mvc_valueFromModel(dm));
		},
		mvc_valueFromView:function(){
		},
		mvc_valueToView:function(value){
			if(Object.isElement(value)) value=xlv.util.getElementValue(value);
			this.$V.img.src=value;
		}
	}
};
